<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/view/system/common/headLogin.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<style type="text/css">
body {
	padding: 0;
	margin: 0;
	font: 12px/ 1.5 tahoma, arial, \5b8b\4f53;
}

body,html {
	height: 100%;
	background: #016aa9;
	overflow: hidden
}

a {
	color: #fff;
	text-decoration: none;
	cursor:pointer;
}

a:hover {
	color: #eff;
	text-decoration: none
}

#outer {
	height: 100%;
	overflow: hidden;
	position: relative;
	width: 100%;
}

#outer[id] {
	display: table;
	position: static;
}

#middle {
	position: absolute;
	top: 50%;
	left: 50%;
	text-align: center;
	margin: -187px 0px 0px -480px;
	width: 960px;
	height: 375px;
}  /* for explorer only*/
#middle[id] {
	display: table-cell;
	vertical-align: middle;
	position: static;
}

#inner { /* position: relative;*/
	left: 50%;
	top: -50%;
	width: 960px;
	height: 375px;
	margin: 0 auto;
	text-align: left;
}  /*for explorer only */
div.greenBorder {
	background: #016aa9 url(asserts/system/images/login1.jpg) no-repeat 0px 0px;
}

ul,li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.login-warp li {
	height: 30px;
	line-height: 30px;
}

.login-warp li span {
	width: 20px;
	height: 30px;
	vertical-align: middle;
	text-align: right;
}

.login-warp .input {
	width: 115px;
	height: 30px;
	padding: 2px;
	background: #333;
	border: solid 1px #80c0db;
	color: #fff;
}

.login-warp .input:hover {
	border: solid 1px #f4f4f4
}

.login-warp {
	position: absolute;
	top: 170px;
	left: 380px;
}

.login-warp a.login {
	color: #fff;
	position: absolute;
	top: 23px;
	left: 200px;
	display: inline-block;
	background: url(asserts/system/images/login.gif) no-repeat 0 0;
	width: 60px;
	height: 30px;
	line-height: 30px;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.login-title {
	font: 22px/ 1.5 bolder \9ED1\4F53 tahoma, arial, \5b8b\4f53;
	position: absolute;
	top: 124px;
	left: 350px;
	color: #fff
}

.copyright {
	position: absolute;
	left: 290px;
	top: 320px;
}

</style>
<script>
var fulls = "left=0,screenX=0,top=0,screenY=0,scrollbars=1";
if (window.screen) {
	var ah = screen.availHeight - 30;
	var aw = screen.availWidth - 10;
	fulls += ",height=" + ah;
	fulls += ",innerHeight=" + ah;
	fulls += ",width=" + aw;
	fulls += ",innerWidth=" + aw;
	fulls += ",resizable"
} else {
	fulls += ",resizable";
}

function openNewWindow(url, name) {
	try {
		window.location = url;
	} catch (e) {
	}
}
//登录
function checkLogin() {
	//判断参数是否为空
	var valid = $('#loginform').form('validate');
	if (valid) {
		var param = $('#loginform').serializeJson(true);
		$.axs("login/checkLogin.action", param, callLoginBack);
	}
};

document.onkeydown=function(event){
    var e = event || window.event || arguments.callee.caller.arguments[0];
     if(e && e.keyCode==13){ // enter 键 
    	 checkLogin();        	
    }
}; 
function onkeydownLogin() {
	if (event.keyCode == 13) {
		checkLogin();
	}
};
function callLoginBack(data) {
	if (data.status == 1) {
		 openNewWindow('view/goMain.action', "");
	}else{
		$.messager.alert("提示信息", data.msg, 'error');
	}
}
//取消置空处理
function reset() {
	$("#password").attr("value", '');
	$("#userName").attr("value", '');
}
//初始化去除登录窗体最大最小化
jQuery().ready(function() {
	$('#w').window( {
		collapsible : false,
		minimizable : false,
		maximizable : false,
		closable : false
	});
});
</script>
<body>
	<div id="outer">
		<div id="middle">
			<div id="inner" class="greenBorder">
				<form action="" method="post" id="loginform"
					style="position: absolute; top: 50%; left: 48%; margin: -187px 0px 0px -470px;">
					<div class="login-title" style="width: 300px; line-height: 30px;" align="center">
						<!-- <s:text name='system_name' /> -->后台管理
					</div>

					<div class="login-warp" style="width: 180px;" align="right">
						<ul>
							<li>
								<span>
								 用户&nbsp;
								<!-- <s:text name='username' /> -->
								<input class="easyui-textbox"
									data-options="iconCls:'icon-man',required:true"
									style="width: 115px" name="userName" id="userName" 
									onkeydown="return onkeydownLogin();"
									value='${cookie.loginDefaultUserName.value}' tabindex="2">
							</li>
							<li>
								<span>
								密码&nbsp;
								<input class="easyui-textbox" type="password" required="true" 
									data-options="iconCls:'icon-lock'" style="width: 115px;"
									name="password" id="password"
									onkeydown="return onkeydownLogin();" tabindex="3">
							</li>
						</ul>
						<a class="login" onclick="checkLogin();" tabindex="4">登录<!-- <s:text name='login' /> --> </a>
					</div>
					<div class="copyright" style="width: 380px;" align="right">
						技术支持：Dessmann(请使用google chrome浏览器,分辨率1366*768)
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>
